package jpa.entitys.promis.common;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the MKT_RECEIPT_DETAILS database table.
 * 
 */
@Embeddable
public class MktReceiptDetailPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String company;

	@Column(name="RECEIPT_TYPE")
	private String receiptType;

	@Column(name="RECEIPT_SERIES")
	private String receiptSeries;

	@Column(name="RECEIPT_NUMBER")
	private long receiptNumber;

	@Column(name="FLAG_CHARGE")
	private String flagCharge;

	@Column(name="SEQ_NO")
	private long seqNo;

	public MktReceiptDetailPK() {
	}
	public String getCompany() {
		return this.company;
	}
	public void setCompany(String company) {
		this.company = company;
	}
	public String getReceiptType() {
		return this.receiptType;
	}
	public void setReceiptType(String receiptType) {
		this.receiptType = receiptType;
	}
	public String getReceiptSeries() {
		return this.receiptSeries;
	}
	public void setReceiptSeries(String receiptSeries) {
		this.receiptSeries = receiptSeries;
	}
	public long getReceiptNumber() {
		return this.receiptNumber;
	}
	public void setReceiptNumber(long receiptNumber) {
		this.receiptNumber = receiptNumber;
	}
	public String getFlagCharge() {
		return this.flagCharge;
	}
	public void setFlagCharge(String flagCharge) {
		this.flagCharge = flagCharge;
	}
	public long getSeqNo() {
		return this.seqNo;
	}
	public void setSeqNo(long seqNo) {
		this.seqNo = seqNo;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof MktReceiptDetailPK)) {
			return false;
		}
		MktReceiptDetailPK castOther = (MktReceiptDetailPK)other;
		return 
			this.company.equals(castOther.company)
			&& this.receiptType.equals(castOther.receiptType)
			&& this.receiptSeries.equals(castOther.receiptSeries)
			&& (this.receiptNumber == castOther.receiptNumber)
			&& this.flagCharge.equals(castOther.flagCharge)
			&& (this.seqNo == castOther.seqNo);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.company.hashCode();
		hash = hash * prime + this.receiptType.hashCode();
		hash = hash * prime + this.receiptSeries.hashCode();
		hash = hash * prime + ((int) (this.receiptNumber ^ (this.receiptNumber >>> 32)));
		hash = hash * prime + this.flagCharge.hashCode();
		hash = hash * prime + ((int) (this.seqNo ^ (this.seqNo >>> 32)));
		
		return hash;
	}
}